extends PlayerStatusBase

var still_time :float = 0
const max_still_time:float = 0.2

func start() ->void:
	still_time = 0
	owner.play_animation("landing")
		
# 物理桢，处理碰撞的逻辑
func run_physics_process(delta):
	var collision_info = owner.move_and_collision_info()
	if collision_info.get("is_on_floor"):
		# 落地僵直
		still_time += delta
		if still_time < max_still_time:
			return
		
	if owner.velocity.x == 0:
		return change_status("Idle")
	else:
		return change_status("Run")
			
# 逻辑桢，处理画面的逻辑
func run_process(delta):	
	common_velocity(delta)
